package org.jivesoftware.smackx.pubsub.packet;

public enum PubSubNamespace
{
  private String fragment;

  static
  {
    PubSubNamespace[] arrayOfPubSubNamespace = new PubSubNamespace[4];
    arrayOfPubSubNamespace[0] = BASIC;
    arrayOfPubSubNamespace[1] = ERROR;
    arrayOfPubSubNamespace[2] = EVENT;
    arrayOfPubSubNamespace[3] = OWNER;
    ENUM$VALUES = arrayOfPubSubNamespace;
  }

  public static PubSubNamespace valueOfFromXmlns(String paramString)
  {
    PubSubNamespace localPubSubNamespace;
    if (paramString.lastIndexOf(35) != -1)
      localPubSubNamespace = valueOf(paramString.substring(1 + paramString.lastIndexOf(35)).toUpperCase());
    while (true)
    {
      return localPubSubNamespace;
      localPubSubNamespace = BASIC;
    }
  }

  public String getFragment()
  {
    return this.fragment;
  }

  public String getXmlns()
  {
    String str = "http://jabber.org/protocol/pubsub";
    if (this.fragment != null)
      str = str + '#' + this.fragment;
    return str;
  }
}